<?php

use think\migration\Migrator;
use think\migration\db\Column;

class AlterCouponProductChannelAddAddvnce extends Migrator
{
    public function up()
    {
        $sql = <<<SQL
            ALTER TABLE `coupon_product_channel` ADD COLUMN `advance_time` int(11)  NOT NULL DEFAULT 0 COMMENT '调价生效时间，时间戳';
            ALTER TABLE `coupon_product_channel` ADD COLUMN `advance_price` int(11)  NOT NULL DEFAULT 0 COMMENT '调价价格';
SQL;
        $this->execute($sql);

    }

    public function down()
    {
        $this->table('coupon_product_channel')
            ->removeColumn('advance_time')
            ->removeColumn('advance_price');
    }
}
